<?php
/**
 * Created by PhpStorm.
 * User: ly
 * Date: 2017\12\15 0015
 * Time: 15:17
 */
?>
<form class="" id="historyForm">
    <div class="perfect-logo ">
        <img src="/image/officeHall/uploadAssetPackage/wsxx.png" class="pull-left">
        <span class="pull-left">流转、前期处置及维护情况</span>
    </div>
    <div class="table-responsive pull-left" >
        <table class="table">
            <thead>
            <tr>
                <th class="text-center"><input type="checkbox" name="" onclick="swapCheck()" id="checkboxs"></th>
                <th class="text-center">转让日期</th>
                <th class="text-center">转让方-受让方</th>
                <th class="text-center">转让内容</th>
                <th class="text-center">备注</th>
            </tr>
            </thead>
            <tbody class="maintenance-tbody">
            <?PHP
            $historyList='';
            $historyCheck='';
            if(count($data['history'])>0){
                $history=$data['history'];
                $i=1;
                foreach($history as $val){
                    $historyList.= '
                        <tr>
                          <td><input type="checkbox" name="checkID'.$i.'" value="'.$val['id'].'" ></td>
                          <input type="hidden" name="id'.$i.'" value="'.$val['id'].'" >
                          <td><input type="text" name="transfer_date'.$i.'" value="'.$val['transfer_date'].'"></td>
                          <td><input type="text" name="transfer'.$i.'" value="'.$val['transfer'].'" placeholder="如：信达—中信"></td>
                          <td><input type="text"  name="content'.$i.'" value="'.$val['content'].'"></td>
                          <td><input type="text"  name="remark'.$i.'" value="'.$val['remark'].'"></td>
                         </tr>';
                    $historyCheck.='<li></li>';
                    $i++;
                }
                echo $historyList;
            }
            ?>
            </tbody>
        </table>
    </div>

    <!-- 增删按钮 -->

    <ul class="table-addpop pull-left maintenance-addpop" >
        <li></li>
        <?PHP echo $historyCheck; ?>
    </ul>
    <div class="warning ">
        <img src="/image/officeHall/uploadAssetPackage/warning.png" class="pull-left">
        <span class="pull-left">按照转让日期先后顺序填写</span>
    </div>
    <!-- 结束按钮 -->
    <div class="btns"  >
        <?PHP
            $butStr='<button type="button" class="maintenance-btn-sav btn btn-primary btns-primary-save pull-right btns-primary maintenance-btn" id="subHistory">保存</button>';
            if(isset($_SERVER['HTTP_REFERER'])){
                if(strpos($_SERVER["HTTP_REFERER"], 'detail-info') !=false){
                    $butStr='<button type="button" class="maintenance-btn-sav btn btn-primary btns-primary-save pull-right btns-primary maintenance-btn" id="subHistoryUpdate">保存</button>';
                }
            }
            echo $butStr;
        ?>
<!--        <button type="button" class="maintenance-btn-sav btn btn-primary btns-primary-save pull-right btns-primary maintenance-btn" id="subHistoryUpdate">保存</button>-->
        <button type="button" class="maintenance-btn-del btn btn-default btns-primary-del pull-right btns-primary maintenance-btn" id="delHistory">删除</button>
    </div>


</form>
